fix: character issues with umlauts#471
Closed
Skyliife wants to merge 3 commits intotibiadata:mainfrom
Closed
Conversation
link to issue: tibiadata#470 - Wrap incoming HTML in charset.NewReader before goquery parsing - Ensures ISO‑8859‑1 (and other legacy) input is normalized to UTF‑8 - Prevents “mojibake” (e.g. “ä” instead of “ä”) - Updated TestWorldAntica to simulate Latin‑1 input and verify correct Umlaut decoding - Added Antica.html for parsing character Näurin Closes tibiadata#470
- fix for character endpoint - Replace custom TibiaDataConvertEncodingtoUTF8 with golang.org/x/net/html/charset.NewReader - Use the actual Content‑Type header from Tibia.com to normalize response bytes into UTF‑8 - Remove resIo/resIo2 steps and feed the UTF‑8 reader directly into goquery
|
Contributor
Author
|
@tobiasehlert I’ve updated the HTML collector to use charset.NewReader with the real Content-Type header instead of our custom converter, so incoming pages should now be normalized to proper UTF‑8 and preserve Umlauts (e.g. “Näurin”). I’m not super familiar with all the Go idioms here, so I’d really appreciate if someone could double check my changes. |
Member
|
List of some umlaut-characters:
|
Member
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



link to issue: #470
Closes #470